﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HybridLab.Workflow.Activities.UI
{
	public partial class BusyIndicator : Form
	{
		private Timer timer;

		public BusyIndicator()
		{
			InitializeComponent();
			timer = new Timer();
			timer.Tick += new EventHandler(timer_Tick);
		}

		void timer_Tick(object sender, EventArgs e)
		{
			if (progressBar1.Value == 100) progressBar1.Value = 0;
			progressBar1.Value++;
		}

		private void BusyIndicator_Load(object sender, EventArgs e)
		{
			timer.Start();
		}

		protected override void OnClosing(CancelEventArgs e)
		{
			timer.Stop();
		}
	}
}
